package com.coderman.common.starter.excelport.imports.beans;

import java.util.concurrent.ConcurrentHashMap;

/**
 * Description: 多表导入模型
 * date: 2020/9/15 11:47 上午
 *
 * @author fanchunshuai
 * @version 1.0.0
 * @since JDK 1.8
 */
public class ImportTitleBean {
    /**
     * 表头描述
     *
     * @return
     */
    private String title;

    /**
     * 主表 表名
     * @return
     */
    private String [] mainArr;

    /**
     * 子表  表名
     * @return
     */
    private String [] childArr;

    /**
     * 主子表关联ID
     * @return
     * 一对多 或者一对一
     * a,b
     * a为主，b为子，
     * a.id=b.aId
     * 插入时a先插入，b后插入
     *
     *  多对多
     *  a,b,c,e
     *  a.id=c.aId
     *  b.id=c.bId
     *  b.id=e.bId
     */
    private String [] referIdArr;

    /**
     * 主子表关联关系
     * a:c,e,f
     * b:c,d
     * e:f
     */
    private ConcurrentHashMap<String,PrimaryKeyBean> primaryKeyBeanMap;

    public ConcurrentHashMap<String, PrimaryKeyBean> getPrimaryKeyBeanMap() {
        return primaryKeyBeanMap;
    }

    public void setPrimaryKeyBeanMap(ConcurrentHashMap<String, PrimaryKeyBean> primaryKeyBeanMap) {
        this.primaryKeyBeanMap = primaryKeyBeanMap;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String[] getMainArr() {
        return mainArr;
    }

    public void setMainArr(String[] mainArr) {
        this.mainArr = mainArr;
    }

    public String[] getChildArr() {
        return childArr;
    }

    public void setChildArr(String[] childArr) {
        this.childArr = childArr;
    }

    public String[] getReferIdArr() {
        return referIdArr;
    }

    public void setReferIdArr(String[] referIdArr) {
        this.referIdArr = referIdArr;
    }
}
